//
//  BaseViewController.m
//  通用框架
//
//  Created by liuchen on 18/9/7.
//  Copyright © 2016年 liuchen. All rights reserved.
//

#import "BaseViewController.h"
#import "LoginBySecretController.h"

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    //self.view.translatesAutoresizingMaskIntoConstraints = YES;
}

- (void)toLoginVC{
    [UserMessage sharedInstance].model = nil;
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"userMessage"];
    [[[UIApplication sharedApplication].delegate window].rootViewController removeFromParentViewController];
    [self.navigationController popToRootViewControllerAnimated:YES];
    [[UIApplication sharedApplication].delegate window].rootViewController = [[UINavigationController alloc] initWithRootViewController:[[LoginBySecretController alloc] init]];
    [[[UIApplication sharedApplication].delegate window] makeKeyAndVisible];
}

@end
